﻿Public Class F02_M_anverso_

    Private Sub btnReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnReverso.Click
        Me.Close()
        F02_M_reverso_.Show()

    End Sub

    Private Sub btnguardar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnguardar.Click
        If (Len(txtnumform.Text) = 0) Then
            MsgBox("EL Número de formulario es un campo obligatorio", MsgBoxStyle.Exclamation)
            txtnumform.Focus()
            Exit Sub
        End If
        Dim oF02MNegocios As New Negocios.NF02_MA
        Dim oF02V As New Entidades.EF02Vehiculos
        oF02V.numformu = UCase(txtnumform.Text)
        oF02V.domini = UCase(txtdominio.Text)
        oF02V.xuno = UCase(txtX1.Text)
        oF02V.xdos = UCase(txtX2.Text)
        oF02V.xtres = UCase(txtX3.Text)
        oF02V.xcuatro = UCase(txtX4.Text)
        oF02V.xcinco = UCase(txtX5.Text)
        oF02V.xseis = UCase(txtX6.Text)
        oF02V.xsiete = UCase(txtX7.Text)
        oF02V.xocho = UCase(txtX8.Text)
        oF02V.xnueve = UCase(txtX9.Text)
        oF02V.xdiez = UCase(txtX10.Text)
        oF02V.xonce = UCase(txtX11.Text)
        oF02V.xdoce = UCase(txtX12.Text)
        oF02V.xtrece = UCase(txtX13.Text)
        oF02V.xcatorce = UCase(txtX14.Text)
        oF02V.xquince = UCase(txtX15.Text)
        oF02V.xdieciseis = UCase(txtX16.Text)
        oF02V.xdiecisiete = UCase(txtX17.Text)
        oF02V.xdieciocho = UCase(txtX18.Text)
        oF02V.xdiecinueve = UCase(txtX19.Text)
        oF02V.xveinte = UCase(txtX20.Text)
        oF02V.declaracion = UCase(txtdeclaraciones.Text)
        oF02V.apenomsolicitant = UCase(txtapenomsolicitante.Text)
        oF02V.apenomapoderad = UCase(txtapenomapoderado.Text)
        oF02V.dnii = UCase(txtdni.Text)
        oF02V.lee = UCase(txtle.Text)
        oF02V.lcc = UCase(txtlc.Text)
        oF02V.dniext = UCase(txtdniextr.Text)
        oF02V.ciext = UCase(txtciextr.Text)
        oF02V.pasapo = UCase(txtpasap.Text)
        oF02V.numdocc = UCase(txtnumdoc.Text)
        oF02V.paiss = UCase(txtpais.Text)
        oF02V.lugarfech = UCase(txtlugarfecha.Text)
        oF02V.chapaa = UCase(txtchapa.Text)
        oF02V.marcaa = UCase(txtmarca.Text)
        oF02V.tipoo = UCase(txttipo.Text)
        oF02V.model = UCase(txtmodelo.Text)
        oF02V.marcamoto = UCase(txtmarcamotor.Text)
        oF02V.numotor = UCase(txtnummotor.Text)
        oF02V.marcachasi = UCase(txtmarcachasis.Text)
        oF02V.numchasi = UCase(txtnumchasis.Text)
        
        Try
            If oF02MNegocios.guardarF02MA(oF02V) Then
                MsgBox("La carga ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Carga fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub

    Private Sub btnEditarAnverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarAnverso.Click
       
        Dim oF02MNegocios As New Negocios.NF02_MA
        Dim oF02V As New Entidades.EF02Vehiculos
        oF02V.numformu = UCase(txtnumform.Text)
        oF02V.domini = UCase(txtdominio.Text)
        oF02V.xuno = UCase(txtX1.Text)
        oF02V.xdos = UCase(txtX2.Text)
        oF02V.xtres = UCase(txtX3.Text)
        oF02V.xcuatro = UCase(txtX4.Text)
        oF02V.xcinco = UCase(txtX5.Text)
        oF02V.xseis = UCase(txtX6.Text)
        oF02V.xsiete = UCase(txtX7.Text)
        oF02V.xocho = UCase(txtX8.Text)
        oF02V.xnueve = UCase(txtX9.Text)
        oF02V.xdiez = UCase(txtX10.Text)
        oF02V.xonce = UCase(txtX11.Text)
        oF02V.xdoce = UCase(txtX12.Text)
        oF02V.xtrece = UCase(txtX13.Text)
        oF02V.xcatorce = UCase(txtX14.Text)
        oF02V.xquince = UCase(txtX15.Text)
        oF02V.xdieciseis = UCase(txtX16.Text)
        oF02V.xdiecisiete = UCase(txtX17.Text)
        oF02V.xdieciocho = UCase(txtX18.Text)
        oF02V.xdiecinueve = UCase(txtX19.Text)
        oF02V.xveinte = UCase(txtX20.Text)
        oF02V.declaracion = UCase(txtdeclaraciones.Text)
        oF02V.apenomsolicitant = UCase(txtapenomsolicitante.Text)
        oF02V.apenomapoderad = UCase(txtapenomapoderado.Text)
        oF02V.dnii = UCase(txtdni.Text)
        oF02V.lee = UCase(txtle.Text)
        oF02V.lcc = UCase(txtlc.Text)
        oF02V.dniext = UCase(txtdniextr.Text)
        oF02V.ciext = UCase(txtciextr.Text)
        oF02V.pasapo = UCase(txtpasap.Text)
        oF02V.numdocc = UCase(txtnumdoc.Text)
        oF02V.paiss = UCase(txtpais.Text)
        oF02V.lugarfech = UCase(txtlugarfecha.Text)
        oF02V.chapaa = UCase(txtchapa.Text)
        oF02V.marcaa = UCase(txtmarca.Text)
        oF02V.tipoo = UCase(txttipo.Text)
        oF02V.model = UCase(txtmodelo.Text)
        oF02V.marcamoto = UCase(txtmarcamotor.Text)
        oF02V.numotor = UCase(txtnummotor.Text)
        oF02V.marcachasi = UCase(txtmarcachasis.Text)
        oF02V.numchasi = UCase(txtnumchasis.Text)

        Try
            If oF02MNegocios.editarF02MA(oF02V) Then
                MsgBox("La edición ha sido exitosa", MsgBoxStyle.MsgBoxSetForeground, "Información")
            End If
        Catch ex As Exception
            MsgBox("Edición fallida. " + ex.Message, MsgBoxStyle.MsgBoxSetForeground, "Información")
        End Try
    End Sub


    Private Sub btnNuevo_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnNuevo.Click
        txtnumform.Text = ""
        txtdominio.Text = ""
        txtX1.Text = ""
        txtX2.Text = ""
        txtX3.Text = ""
        txtX4.Text = ""
        txtX5.Text = ""
        txtX6.Text = ""
        txtX7.Text = ""
        txtX8.Text = ""
        txtX9.Text = ""
        txtX10.Text = ""
        txtX11.Text = ""
        txtX12.Text = ""
        txtX13.Text = ""
        txtX14.Text = ""
        txtX15.Text = ""
        txtX16.Text = ""
        txtX17.Text = ""
        txtX18.Text = ""
        txtX19.Text = ""
        txtX20.Text = ""
        txtdeclaraciones.Text = ""
        txtapenomsolicitante.Text = ""
        txtapenomapoderado.Text = ""
        txtdni.Text = ""
        txtle.Text = ""
        txtlc.Text = ""
        txtdniextr.Text = ""
        txtciextr.Text = ""
        txtpasap.Text = ""
        txtnumdoc.Text = ""
        txtpais.Text = ""
        txtlugarfecha.Text = ""
        txtchapa.Text = ""
        txtmarca.Text = ""
        txttipo.Text = ""
        txtmodelo.Text = ""
        txtmarcamotor.Text = ""
        txtnummotor.Text = ""
        txtmarcachasis.Text = ""
        txtnumchasis.Text = ""

    End Sub

    Private Sub btnEditarReverso_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEditarReverso.Click
        F02_M_reverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnsalir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnsalir.Click
        Me.Close()
    End Sub

    Private Sub btnF01V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01V.Click
        F01_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01M.Click
        F01_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF01I_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF01I.Click
        F01_VImp_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF02V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF02V.Click
        F02_V_anverso_.Show()
        Me.Close()
    End Sub


    Private Sub btnF04V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF04V.Click
        F04_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn.Click
        F04_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08V.Click
        F08_V_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF08M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF08M.Click
        F08_M_anverso_.Show()
        Me.Close()
    End Sub

    Private Sub btnF11V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11V.Click
        F11_V_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF11M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF11M.Click
        F11_M_anverso_.Show()
        Me.Close()

    End Sub

    Private Sub btnF12V_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12V.Click
        F12_V.Show()
        Me.Close()
    End Sub

    Private Sub btnF12M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF12M.Click
        F12_M.Show()
        Me.Close()
    End Sub

    Private Sub btnF99_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF99.Click
        F99.Show()
        Me.Close()
    End Sub

    Private Sub btnF59M_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnF59M.Click
        F59_M.Show()
        Me.Close()
    End Sub

    Private Sub btnFR00_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnFR00.Click
        F_R00.Show()
        Me.Close()
    End Sub
End Class
